package 酒店管理系统模拟.test01;

public class User {
    Room room;
    Room[][] rooms = new Room[3][10];

    public User(Room room) {
        this.room = room;
    }

    Import input = new Import();
    public void booking(){
        input.input();
        int storey;
        int roomNumber;
        if(input.getStorey() <= 3 && input.getStorey() > 0) {
            storey = input.getStorey();
            if (input.getRoomNumber() <= 10 && input.getRoomNumber() > 0) {
                roomNumber = input.getRoomNumber();
            } else {
                System.out.println("输入楼层房间号错误");
                return;
            }
            room.roomNumber = storey + "-" + roomNumber;
            rooms[input.getStorey()][input.getRoomNumber()] = new Room();
            if (rooms[storey][roomNumber].status = false) {
                System.out.println("此房间已被预订");
                return;
            }
            rooms[storey][roomNumber].status = false;
            if (input.getStorey() == 1) {
                rooms[input.getStorey()][input.getRoomNumber()].type = "单人间";
            } else if (input.getStorey() == 2) {
                rooms[input.getStorey()][input.getRoomNumber()].type = "标准间";
            } else if (input.getStorey() == 3) {
                rooms[input.getStorey()][input.getRoomNumber()].type = "豪华间";
            }
        }
    }
    //public void
}
